#include "../include/geometrySquare.hpp"
#include <stdexcept>

namespace geometry {

Square::Square(double side) : side_(side) {
    if (side_ <= 0) {
        throw std::invalid_argument("Side must be positive.");
    }
}

double Square::getArea() const {
    return side_ * side_;
}

} // namespace geometry